test(lit-query/createMutationController): add test for using mutation defaults - #11793
Conversation
|
View your CI Pipeline Execution ↗ for commit c367c05
☁️ Nx Cloud last updated this comment at |
🚀 Changeset Version PreviewNo changeset entries found. Merging this PR will not cause a version bump for any packages. |
|
Navigate logical layers of code changes, visualize relationships, and explore their blast radius. No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Repository: TanStack/query/.coderabbit.yaml Review profile: CHILL Plan: Advanced Run ID: 📒 Files selected for processing (1)
Included review availability: This review used your included allowance. Your plan provides up to 10 included reviews per hour; 9 remain after this review. 📝 WalkthroughWalkthroughAdds a test for a mutation controller that uses a mutation function configured with ChangesMutation Defaults
Priority: ⬇️ Low Estimated code review effort: 1 (Trivial) | ~4 minutes Change: Other Merge Risk: ⚪ Minimal · up to This test-only change covers mutation defaults and successful results. It is mergeable after normal checks. 🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
✨ Finishing Touches📝 Generate docstrings
🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
size-limit report 📦
|
🎯 Changes
Adds "should be able to use mutation defaults" to
createMutationControllertests. It registers amutationFnwithqueryClient.setMutationDefaultsfor amutationKey, creates the controller with only thatmutationKey, and asserts the rendered output goes from idle to pending to success with the data from the defaultmutationFn.No existing test checked that the controller applies the client's mutation defaults.
✅ Checklist
pnpm run test:pr, or these tests do not apply to this pull request.🚀 Release Impact
Summary by CodeRabbit